package modelLayer;

/**
 * Class Customer is a class representing shared characteristics of the different Customers types.
 *
 * @author  Danny M.P., Jakob K., Anna K., Thomas V.  
 * @version 1.0
 */

public class Customer extends Person {

	private int customerID;
	
	public Customer(int customerID, String name, String address, String city, String country, 
			  	    String phoneNo, String email, int zipCode) {
		
		super(name, address, city, country, phoneNo, email, zipCode);
		if (!(this.setCustomerID(customerID))) {
			throw new IllegalArgumentException("Der opstod en fejl i oprettelsen af kundens ID");
		}
	
	}
	
	public Customer() {
		
		super();
		
	}
	
	
	 /**
     * Sets the ID of the customer.
     *
     * @param int adds customerID.
     */
	public boolean setCustomerID(int customerID) {
		
		if (customerID <= 0) {
			return false;
		}
		else {
			this.customerID = customerID;
			return true;
		}
		
	}
	
	public int getCustomerID() {
		
		return this.customerID;
		
	}
	
}
